package com.wzl.customviewproject.page;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.wzl.customviewproject.R;
import com.wzl.customviewproject.adapter.ParentListAdapter;

import java.util.ArrayList;

public class NestedSlidingActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nested_sliding);

        RecyclerView rvParent = findViewById(R.id.recyclerView);
        rvParent.setLayoutManager(new LinearLayoutManager(this));
        ArrayList<String> parentList = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            parentList.add("ParentView"+i);
        }
        ParentListAdapter parentListAdapter = new ParentListAdapter(this, parentList);
        rvParent.setAdapter(parentListAdapter);
/*
        viewPager = findViewById(R.id.viewPager);
        FragmentPagerAdapter fragmentPagerAdapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
            @Override
            public int getCount() {
                return 2;
            }

            @NonNull
            @NotNull
            @Override
            public Fragment getItem(int position) {
                return TestFragmentOne.newInstance();
            }
        };
        viewPager.setAdapter(fragmentPagerAdapter);*/
    }
}